package response

const (
	SuccessCode            = 0
	UnauthorizedCode       = 401
	FailedCode             = 99999
	SystemModuleBaseCode   = 10000
	CaptchaModuleBaseCode  = 20000
	UserModuleBaseCode     = 30000
	RoleModuleBaseCode     = 40000
	UserRoleModuleBaseCode = 50000
	MenuModuleBaseCode     = 60000
	RoleMenuModuleBaseCode = 70000
)

const (
	SystemParameterErrorCode = iota + SystemModuleBaseCode
	SystemPermissionCode
)

const (
	CaptchaParameterErrorCode = iota + CaptchaModuleBaseCode
	GetCaptchaFailedCode
	CaptchaVerifiedCode
	CaptchaInvalidOrExpiredCode
)

const (
	UserParameterErrorCode = iota + UserModuleBaseCode
	UserNotFoundCode
	UserRegistrationFailedCode
	UserAccountExistsCode
	UserNameExistsCode

	UserLoginSuccessCode
	UserLoginFailedCode
	UserAccountOrPasswordFailedCode
	UserModifyInfoFailedCode

	UserUnauthorizedCode
	UserPermissionDeniedCode
	UserAccountLockedCode
)

const (
	RoleNotFoundCode = iota + RoleModuleBaseCode
	RoleExistsCode
)

const (
	UserRoleNotFoundCode = iota + UserRoleModuleBaseCode
	UserRoleExistsCode
)

const (
	MenuParameterErrorCode = iota + MenuModuleBaseCode
	MenuNotFoundCode
	MenuExistsCode
	MenuParentIdNotEmptyCode
	MenuParentNotFoundCode
	MenuLevelErrorCode
	MenuDeleteCode
)

const (
	RoleMenuNotFoundCode = iota + RoleMenuModuleBaseCode
	RoleMenuExistsCode
)
